package com.maimao.core.exception;

import com.maimao.core.enums.AuthEnum;
import com.maimao.core.enums.ExceptionEnum;

/**
 * 认证异常
 *
 * @author MaoLin Wang
 * @date 2020/11/30 4:06 下午
 */
public class AuthException extends RuntimeException {
    private String msg;
    private Integer code;

    public AuthException(AuthEnum authEnum) {
        this.msg = authEnum.getMessage();
        this.code = authEnum.getCode();
    }

    public AuthException(String msg, Integer code) {
        this.msg = msg;
        this.code = code;
    }

    public AuthException() {
    }

    public String getMsg() {
        return msg;
    }

    public Integer getCode() {
        return code;
    }
}
